from django.conf import settings
from django.conf.urls.defaults import *

# Streamux paths.
urlpatterns = patterns(
    'radio.views',
    (r'^$', 'home'),

    # AutoDJ stuff.
    (r'^autodj/next$', 'autodj_next'),

    # Example:
    # (r'^streamux/', include('streamux.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # (r'^admin/(.*)', admin.site.root),
)

# Authentication machinery
urlpatterns += patterns(
    'django.contrib.auth.views',
    (r'^login$', 'login', {'template_name': 'login.html'}),
    (r'^logout$', 'logout', {'template_name': 'home.html'}))

# In debug mode, serve static media directly. In production, the real
# web server should serve them.
if settings.DEBUG == True:
    urlpatterns += patterns(
        '',
        (r'^media/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': settings.MEDIA_ROOT}))
